{% load statuses %}
{% load i18n %}

<div class="policyItem {% if fst %}firstPolicyItem{% elif mode == "none" or lst %}{% if typ == "pdfversion" %}lastPolicyItem{% endif %}{% endif %}">
    {% if mode == "radio" %}
    <div style="display:none;">
        <span id="hiddenInlineUploadType-{{ typ }}">
            <span><strong>{{ type_text_no_punc }}</strong>
                (<span class="policyPicSpan policyPic-{{ policy }}"></span>
                {{ policy | explain_policy_short_no_punc }})</span>
        </span>
    </div>
    {% endif %}
    <div class="policyPic policyPic-{{ policy }}"></div>
    <div class="policyText">
        <p>
        {% if mode == "radio" %}<label>{% endif %}
            <span class="helpPopover" data-content="{{ type_explanation }}" rel="popover" data-placement="bottom">{{ type_text }}</span> {{ policy | explain_policy_short }}
            <span class="policyDetailUpload">
            {% if mode == "link" and can_be_deposited %}
            <a href="{% url 'upload_paper' paper.pk %}?type={{ typ }}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-open"></span> {% trans "Upload" %}</a>
            {% elif mode == "radio" %}
            <input type="radio" name="radioUploadType" value="{{ typ }}" id="radio{{ typ }}"
                {% if request.GET.type == typ %}checked="checked"{% endif %} />   
            {% endif %}
            </span>
        {% if mode == "radio" %}</label>{% endif %}
        </p>
        <ul>
        {% for restriction in conditions %}
            <li>
                {% if mode == "radio" %}<label for="radio{{ typ }}">{% endif %}
                {{ restriction|striptags }}
            {% if mode == "radio" %}</label>{% endif %}
            </li>
        {% endfor %}
        </ul>
    </div>
    {% if mode != "none" %}
    <div style="clear:left;"></div>
    {% endif %}
</div>

